<?php
//用于创建pizza的工厂
class SimplePizzaFactory {
    public function create($type)
    {
        $pizza = null;
        switch ($type)
        {
            case 'liulian' :
                $pizza = new LiulianPizza();
                break;
            case 'egg' :
                $pizza = new EggPizza();
                break;
            case 'caomei' :
                $pizza = new CaomeiPizza();
                break;
        }
        return $pizza;
    }
}